﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using csvm2.pin.contract;

namespace csvm2.fileadapter
{
    public class FileAdapter : IFileAdapter
    {
        public void ProcessLoad(string filename)
        {
            const int N = 100;

            this.OnLine(filename);
            for (int i = 0; i < N; i++)
            {
                this.OnLine("line: " + i);
                this.OnProgress((double)i/N);
            }

            this.OnLine(null);
        }

        public event Action<string> OnLine;
        public event Action<double> OnProgress;
    }
}
